package com.example.lenovo.mywechat.homepage;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.example.lenovo.mywechat.R;
import com.example.lenovo.mywechat.User;
import com.example.lenovo.mywechat.server_config.ServerConfig;
import com.snow.proto.my_wechat.UserInfo;

import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;

public class HomepageActivity extends AppCompatActivity {
    public static ManagedChannel managedChannel = ManagedChannelBuilder.forAddress(ServerConfig.ip, ServerConfig.port).usePlaintext(true).build();
    public static UserInfo userInfo;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //以下两行是MyWeChat需要的代码，其他为测试代码。
        setContentView(R.layout.activity_main);
        Homepage homepage = new Homepage(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        managedChannel.shutdown();
    }
}
